import { DictVO } from '@/common/vo';
import Axios from '@/utils/request';
import { OverrunEventDTO, OverrunEventRepVO, FeedbackRepVO } from '../vo/disposal-center';

export default class API {
    /**
     * 获取超限事件表
     * @source TR_OVERRUN_EVENT
     */
    static getOverrunEventList(data: OverrunEventDTO): Promise<OverrunEventRepVO> {
        return Axios.post('/foreground/index/query', data)
    }

    /**
     * 获取反馈详情(跟踪管理)
     * @source TR_OVERRUN_FEEDBACK
     */
    static getFeedbackList(data: any): Promise<FeedbackRepVO> {
        return Axios.post('/middle/feedback/query', data)
    }

    /**
     * 发起事件反馈(事件处理)
     */
    static initFeedback(data: any): Promise<any> {
        return Axios.post('/middle/feedback/insert', data)
    }

    /**
     * 获取 超限天数分布 图表
     */
    static getQueryDayChart(): Promise<any> {
        return Axios.post('/foreground/overrun/queryDay')
    }

    /**
     * 获取 待调整超限指标 图表
     */
    static getAdjIndexChart(): Promise<any> {
        return Axios.post('/foreground/stay/adjIndex')
    }

    /**
     * 获取产品超限指标
     */
    static getProductList(): Promise<any> {
        return Axios.post('/foreground/product/index')
    }

    /**
     * 获取超限指标详情
     */
    static getOverrunEventDetail(data): Promise<any> {
        return Axios.post('/foreground/index/detail', data)
    }
}
